# Maintainer: Michael Zhou <zhoumichaely@gmail.com>
# Contributor: Michael Zhou <zhoumichaely@gmail.com>
pkgname=py3-gevent
pkgver=21.12.0
pkgrel=0
pkgdesc="Python3 library for seamless coroutine-based concurrency"
options="!check" # Requires unpackaged 'objgraph'
url="http://gevent.org/"
arch="all"
license="MIT"
depends="
	py3-greenlet
	py3-setuptools
	py3-zope-event
	py3-zope-interface
	"
makedepends="
	c-ares-dev
	cython
	file
	libev-dev
	libevent-dev
	libuv-dev
	py3-setuptools
	python3-dev
	"
source="https://github.com/gevent/gevent/archive/$pkgver/gevent-$pkgver.tar.gz"
builddir="$srcdir/gevent-$pkgver"

replaces="py-gevent" # Backwards compatibility
provides="py-gevent=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	export GEVENTSETUP_EMBED=0
	CYTHON=cython PYTHON=python3 python3 setup.py build
}

package() {
	export GEVENTSETUP_EMBED=0
	python3 setup.py install --prefix=/usr --root="$pkgdir"

	rm -rf "$pkgdir"/usr/lib/python3*/site-packages/*/tests
}

sha512sums="
91cc1a9a2c6c1789cbb045d5ee3f23e4115b7d06738e28bf410d7a2db74b6ec9bde0f2ba963c6e93a746febab1483145ec77d53482ac0fa1bb2b7e3deb4b4a4e  gevent-21.12.0.tar.gz
"
